<style scoped lang="stylus" type="text/stylus">
@import 'Done.styl';
</style>
<style>
#Approval .ivu-modal-body {
    height: 600px;
}

#lookOver .ivu-modal-body {
    height: 600px;
}

.ivu-modal {
    top: 40px;
}

#passBackModal .deleteFile {
    float: right;
    cursor: pointer;
}

#passBackModal .fileName {
    background-color: #cccccc;
    padding: 5px 10px;
}

#passBackModal .ivu-modal-body {
    padding: 18px 30px;
}

#passBackModal .ivu-modal {
    top: 100px;
}

#timeInput .ivu-date-picker-rel {
    width: 180px;
}

#timeInput .ivu-input-wrapper {
    width: 100%;
}
</style>

<template>
    <div id="done">

        <!-- ===   筛选按钮一级选选择栏   === -->
        <div class="screenArea" v-show='switchover=="1"'>
            <div class="screen-condition">
                <ul>
                    <li>
                        <!-- <Button type="info" @click="filter(1)" :class="{selectedColor:active == 1}">企业信息</Button> -->
                    </li>
                    <li>
                        <Button @click="filter(1)" :class="{selectedColor:active == 1}">申请状态</Button>
                    </li>
                    <li>
                        <Button @click="filter(2)" :disabled="!notPassed" :class="{selectedColor:active == 2}">公示状态</Button>
                    </li>
                    <li>
                        <Button @click="filter(3)" :disabled="!notPassed" :class="{selectedColor:active == 3}">立项状态</Button>
                    </li>
                    <li>
                        <Button @click="filter(4)" :disabled="!notPassed" :class="{selectedColor:active == 4}">合同签订状态</Button>
                    </li>
                    <li>
                        <!-- v-if="notPassed" -->
                        <Button @click="filter(5)" :disabled="!notPassed" :class="{selectedColor:active == 5}">编辑</Button>
                    </li>
                    <li>
                        <!-- v-if="notPassed" -->
                        <Button @click="filter(6)" :class="{selectedColor:active == 6}">选择</Button>
                    </li>
                    <li id='timeInput'>
                        <Col span="10">
                        <DatePicker :value="time1" format="yyyy-MM-dd" type="daterange" placement="bottom-end" placeholder="选择时间段" @on-change="getDateValue" style="width: 180px"></DatePicker>
                        </Col>
                    </li>

                    <li class="searchCompany">
                        <Input v-model.trim="companyName" @on-change="searchCompany()" placeholder="搜索企业名或政策名">
                        <Button slot="append" icon="ios-search" @click="searchCompanyBtn()"></Button>
                        </Input>
                        <ul class="companyList" v-show="companList.length >= 1">
                            <li @click="currentCompany(index)" v-for="(company,index) of companList" :key="index">
                                <p>{{company.companyName}}</p>
                            </li>
                        </ul>
                    </li>

                </ul>
            </div>

            <!-- 筛选条件展区去 -->
            <div class="exhibition">
                <p>
                    <span>已选条件：</span>
                    <span v-show="SQvalue!=''">{{SQvalue}}&nbsp;</span>
                    <span v-show="GSvalue!=''">/&nbsp;{{GSvalue}}</span>
                    <span v-show="LXvalue!=''">/&nbsp;{{LXvalue}}</span>
                    <span v-show="HTvalue!=''">/&nbsp;{{HTvalue}}</span>
                </p>
            </div>

            <!-- 筛选按钮二级选择栏 -->
            <div class="scree-info" v-if="operation">
                <!-- 申请状态按钮 -->
                <div v-if="filterButton01" class="apply-button">
                    <div class="buttom-box">
                        <Button @click='selectStatus("SQ1")' :class="{selectedColor:seek_SQ == 'SQ1'}">上会通过</Button>
                        <Button @click='selectStatus("SQ2")' :class="{selectedColor:seek_SQ == 'SQ2'}">上会不通过</Button>
                        <Button @click='selectStatus("SQ3")' :class="{selectedColor:seek_SQ == 'SQ3'}">强制中断</Button>
                    </div>
                </div>

                <div v-if="filterButton02" class="publicityState-button">
                    <div class="buttom-box">
                        <Button @click='selectStatus("GS1")' :class="{selectedColor:seek_GS == 'GS1'}">已生成公示文件</Button>
                        <Button @click='selectStatus("GS2")' :class="{selectedColor:seek_GS == 'GS2'}">未生成公示文件</Button>
                    </div>
                </div>

                <div v-if="filterButton03" class="projectState-button">
                    <div class="buttom-box">
                        <Button @click='selectStatus("LX1")' :class="{selectedColor:seek_LX == 'LX1'}">已生成立项文件</Button>
                        <Button @click='selectStatus("LX2")' :class="{selectedColor:seek_LX == 'LX2'}">未生成立项文件</Button>
                    </div>
                </div>

                <div v-if="filterButton04" class="contractState-button">
                    <div class="buttom-box">
                        <Button @click='selectStatus("HT1")' :class="{selectedColor:seek_HT == 'HT1'}">未发送合同文档</Button>
                        <Button @click='selectStatus("HT2")' :class="{selectedColor:seek_HT == 'HT2'}">已发送合同文档</Button>

                        <Button @click='selectStatus("HT3")' :class="{selectedColor:seek_HT == 'HT3'}">合同未审批</Button>
                        <Button @click='selectStatus("HT4")' :class="{selectedColor:seek_HT == 'HT4'}">合同审批已通过</Button>

                        <Button @click='selectStatus("HT5")' :class="{selectedColor:seek_HT == 'HT5'}">合同审批不通过</Button>
                        <Button @click='selectStatus("HT6")' :class="{selectedColor:seek_HT == 'HT6'}">合同已回传</Button>
                    </div>
                </div>

                <div v-if="filterButton05" class="select-button">

                </div>
            </div>
        </div>

        <div class="claicEdit" v-show="switchover=='2'">
            <div class="screen-goBack">
                <ul>
                    <li>
                        <Button @click="claicEditBtn(1)" :class="{selectedColor:editActive == 1}">返回</Button>
                    </li>
                </ul>
            </div>
        </div>

        <div class="clickSelectBtn" v-show='switchover=="3"'>
            <div class="screen-condition">
                <ul>
                    <li>
                        <Button @click="selectBtn(6)">返回</Button>
                    </li>
                    <li>
                        <Button @click="selectBtn(1)" :disabled="!notPassed">生成公示文件</Button>
                    </li>
                    <li>
                        <Button @click="selectBtn(2)" :disabled="!notPassed">生成立项文件</Button>
                    </li>
                    <li>
                        <Button @click="selectBtn(3)" :disabled="!notPassed">发送合同模板</Button>
                    </li>
                    <li>
                        <Button @click="selectBtn(4)" :class="{selectedColor:selectActiveAll == 4}">全选</Button>
                    </li>
                    <li>
                        <Button @click="selectBtn(5)">页面导出</Button>
                    </li>

                </ul>
            </div>

            <div class="exhibition" v-if="policySection.length>0">
                <p>
                    <span>已选择了&nbsp;{{policySection.length}}&nbsp;条项目申请</span>
                </p>
            </div>
        </div>

        <!-- 内容显示区域 頭部 -->
        <div class="infoArea">
            <div class="infoArea-title">
                <ul>
                    <li class="serialNumber">序号</li>
                    <li class="enterprise">企业名称</li>
                    <li class="policy">政策名称</li>
                    <li class="declare">申报资助</li>
                    <li class="declareMoney">确定资助金额</li>
                    <li class="publicityState">公示状态</li>
                    <li class="projectState">立项状态</li>
                    <li class="contractState">合同签订状态</li>
                </ul>
            </div>

            <!-- 内容显示区域 內容 -->
            <VuePerfectScrollbar class="infoArea-content">
                <ul v-if="manageInfoList.length>0">

                    <CheckboxGroup v-model="policySection" @on-change="selectThePolicy">
                        <li class="infoArea-line" v-for="(items,index) in manageInfoList" :key="index">
                            <ul class="infoAreaLine-ul">
                                <!-- 序号 -->
                                <li class="serialNumber">
                                    <div v-if="switchover!='3'">{{index+1}}</div>
                                    <div v-if="switchover=='3'">
                                        <Checkbox :label="items.applyId">{{index+1}}</Checkbox>
                                    </div>
                                </li>

                                <!-- 企业名称 -->
                                <li class="enterprise">
                                    <u class="underline">
                                        <p @click="policyApplyDetail(items.applyId)">{{items.companyName}}</p>
                                    </u>
                                    <p class="underline-N" @click="policyApplyDetail(items.applyId)">{{items.companyName}}</p>
                                    <div class="appliInfo">
                                        <p>{{items.companyName}}</p>
                                        <p>申請資助負責人：{{items.name}}</p>
                                        <p>联系方式：{{items.companyPhone}}</p>
                                        <p v-if="SQstate=='38'">上会通过时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='39'">上会被拒绝时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='49'">上会强制中断时间：{{items.operateAt}}</p>
                                    </div>
                                </li>

                                <!-- 政策名称 -->
                                <li class="policy">
                                    <u class="underline">
                                        <p @click="policyApplyDetail(items.applyId)">{{items.policyTitle}}</p>
                                    </u>
                                    <p class="underline-N" @click="policyApplyDetail(items.applyId)">{{items.policyTitle}}</p>
                                    <div class="appliInfo">
                                        <p>{{items.companyName}}</p>
                                        <p>申請資助負責人：{{items.name}}</p>
                                        <p>联系方式：{{items.companyPhone}}</p>
                                        <p v-if="SQstate=='38'">上会通过时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='39'">上会被拒绝时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='49'">上会强制中断时间：{{items.operateAt}}</p>
                                    </div>
                                </li>

                                <!-- 申报资助 -->
                                <li class="declare">
                                    <u class="underline">
                                        <p @click="policyApplyDetail(items.applyId)">{{items.prizes}}</p>
                                    </u>
                                    <p class="underline-N" @click="policyApplyDetail(items.applyId)">{{items.prizes}}</p>
                                    <div class="appliInfo">
                                        <p>{{items.companyName}}</p>
                                        <p>申請資助負責人：{{items.name}}</p>
                                        <p>联系方式：{{items.companyPhone}}</p>
                                        <p v-if="SQstate=='38'">上会通过时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='39'">上会被拒绝时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='49'">上会强制中断时间：{{items.operateAt}}</p>
                                    </div>
                                </li>

                                <!-- 申报总资助金额 -->
                                <li class="declareMoney">
                                    <u class="underline">
                                        <p @click="policyApplyDetail(items.applyId)" class="sunMoney">{{items.supportAmount}}</p>
                                    </u>
                                    <p @click="policyApplyDetail(items.applyId)" class="sunMoney underline-N">{{items.supportAmount}}</p>
                                    <div class="appliInfo">
                                        <p>{{items.companyName}}</p>
                                        <p>申請資助負責人：{{items.name}}</p>
                                        <p>联系方式：{{items.companyPhone}}</p>
                                        <p v-if="SQstate=='38'">上会通过时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='39'">上会被拒绝时间：{{items.operateAt}}</p>
                                        <p v-if="SQstate=='49'">上会强制中断时间：{{items.operateAt}}</p>
                                    </div>
                                </li>

                                <!-- 公示状态 -->
                                <li class="publicityState">
                                    <div v-if="switchover=='1'||switchover=='3'">
                                        <p v-if="items.publicStatus==0||items.publicStatus==null">未生成公示文件</p>
                                        <p v-else>已生成公示文件</p>
                                    </div>

                                    <div v-if="switchover=='2'">
                                        <Button @click="PublicityStatus(0,index)" :class="{selectedColor:items.publicStatus =='0'||items.publicStatus == null}">未生成</Button>
                                        <Button @click="PublicityStatus(1,index)" :class="{selectedColor:items.publicStatus =='1'}">已生成</Button>
                                    </div>
                                </li>

                                <!-- 立项状态 -->
                                <li class="projectState">
                                    <div v-if="switchover=='1'||switchover=='3'">
                                        <p v-if="items.approvalStatus==0||items.approvalStatus==null">未生成立项文件</p>
                                        <p v-else>已生成立项文件</p>
                                    </div>

                                    <div v-if="switchover=='2'">
                                        <Button @click="projectStatus(0,index)" :class="{selectedColor:items.approvalStatus =='0'||items.approvalStatus == null}">未立项</Button>
                                        <Button @click="projectStatus(1,index)" :class="{selectedColor:items.approvalStatus =='1'}">已立项</Button>
                                    </div>
                                </li>

                                <!-- 合同签订 -->
                                <li class="contractState">
                                    <div>
                                        <p v-if="items.signStatus=='0'||items.signStatus==null">未发送合同模板</p>
                                        <p v-if="items.signStatus=='1'">已发送合同模板</p>
                                        <div class="approval" v-if="items.signStatus=='2'">
                                            <p @click="approveTheContract(items)">{{items.fileName}}</p>
                                            <span>未审批</span>
                                        </div>
                                        <div class="approvedDrawing" v-if="items.signStatus=='4'">
                                            <p @click="viewer(items)">{{items.fileName}}</p>
                                            <span>已驳回</span>
                                        </div>
                                        <div class="approvedDrawing" v-if="items.signStatus=='5'">
                                            <p @click="viewer(items)">{{items.fileName}}</p>
                                            <span>已回传</span>
                                        </div>

                                        <div v-if="switchover=='1'||switchover=='3'">
                                            <div class="approvedDrawing" v-if="items.signStatus=='3'">
                                                <div class="passBack">
                                                    <Button size="small" @click="uploadFileBtn(items)">回传</Button>
                                                </div>
                                                <p @click="viewer(items)">{{items.fileName}}</p>
                                                <span v-if="items.paperStatus==null||items.paperStatus=='0'">审核通过</span>
                                                <span v-else>已接收纸质</span>
                                            </div>
                                        </div>

                                        <div v-if="switchover=='2'">
                                            <div v-if="items.signStatus=='3'">
                                                <Button size="small" @click="auditStatus(0,items)" :class="{selectedColor:items.paperStatus == '0'||items.paperStatus == null}">审核通过</Button>
                                                <Button size="small" @click="auditStatus(1,items)" :class="{selectedColor:items.paperStatus !='0'&& items.paperStatus != null}">已接收纸质</Button>
                                            </div>
                                        </div>

                                    </div>

                                </li>

                            </ul>
                        </li>
                    </CheckboxGroup>
                </ul>
                <ul v-else>
                    <div class="errHint">
                        <i class="iconfont icon-zanwuneirong"></i>
                        <div>没有检索到符合的项目申请</div>
                    </div>
                </ul>
            </VuePerfectScrollbar>

            <!-- 分页 -->
            <div class="paging" v-show='switchover!="3"'>
                <Page :total="totalCount" :page-size="pageSize" show-elevator show-total @on-change="handlePage" @on-page-size-change="handlePageSize" :current="pageNum" class="PageStyle"></Page>
            </div>
        </div>

        <div class="compactList" ref="compactShell">
            <h2>合同模板选择栏</h2>
            <VuePerfectScrollbar class="compactList-content">
                <ul>
                    <li v-for="(compact,index) in contractTemplateList" :key="index">
                        <ul>
                            <li @click="optionalModule(index,compact)" :class="{selectColor:selectColorBtn == compact.id}">

                                <Tooltip placement="left" transfer>
                                    <p>{{compact.fileName}}</p>
                                    <div id="hover_info" slot="content">
                                        <div>{{compact.fileName}}</div>
                                    </div>
                                </Tooltip>
                            </li>
                        </ul>
                    </li>
                </ul>
            </VuePerfectScrollbar>
            <div class="compactList-btn">
                <Button type="error" class="cancelBtn" @click="cancelBtn()">取消</Button>
                <Button type="primary" @click="sendTemplate()">确定</Button>
            </div>
        </div>

        <div id="Approval">
            <Modal width='1020px' :mask-closable='false' v-model="approvalModal" title="合同审批" ok-text="审批通过" cancel-text="驳回">
                <iframe style="width:100%;height:580px" :src="CompaniesSubmitPath"></iframe>
                <div slot="footer">
                    <Button @click="reject()">驳回</Button>
                    <Button @click="pass()">通过</Button>
                </div>
            </Modal>
        </div>

        <div id="lookOver">
            <Modal v-model="viewerContract" width="1020">
                <p slot="header">
                    <span>合同</span>
                </p>
                <div style="text-align:center">
                    <iframe style="width:100%;height:580px" :src="CompaniesSubmitPath"></iframe>
                </div>
                <div slot="footer">
                    <!-- <Button type="error" size="large" long :loading="modal_loading" @click="del">Delete</Button> -->
                </div>
            </Modal>
        </div>

        <Modal v-model="reasonModal" title="驳回">
            <Input v-model="reasonText" type="textarea" placeholder="请填写驳回理由"></Input>
            <div slot="footer">
                <Button @click="abolish()">取消</Button>
                <Button @click="asyncOK()">确定</Button>
            </div>
        </Modal>

        <Modal id="passBackModal" :mask-closable='false' :closable='false' v-model="passBackModal" title="上传文件" widt='360'>
            <p slot="header">
                <span>上传文件</span>
            </p>
            <div>
                <div v-if='filesObj' class="fileName">
                    <i class="ivu-icon ivu-icon-document-text"></i>
                    <span>{{files.fileName}}</span>
                    <span class="deleteFile" @click="deleteFile(files)">
                        <Icon type="ios-close"></Icon>
                    </span>
                </div>

                <Upload v-if="!filesObj" multiple type="drag" :action="uploadUrl" :before-upload="handleBefore" :on-success="handleSuccess" :data="{moduleName:'finished/govReply'}" :with-credentials="true" :format="['pdf','PDF']" accept=".pdf">
                    <div style="padding: 20px 0">
                        <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
                        <p>点击或拖拽文件到此上传</p>
                    </div>
                </Upload>

            </div>
            <div slot="footer">
                <Button @click="cancleUpload()">取消</Button>
                <Button @click="confirmUpload()">确定</Button>
            </div>

        </Modal>

    </div>
</template>

<script type="text/ecmascript-6">
import { formatDate } from "../../common/date.js";

export default {
    name: "done",
    data() {
        return {
            //页面数据
            manageInfoObj: {},
            manageInfoList: [],
            contractTemplateList: [],
            //一级条件选择按钮
            filterButton01: true,
            filterButton02: false,
            filterButton03: false,
            filterButton04: false,
            filterButton05: false,
            filterButton06: false,
            //二级条件选择按钮
            seek_SQ: "SQ1",
            seek_GS: "",
            seek_LX: "",
            seek_HT: "",
            //二级状态
            SQstate: "38",
            GSstate: "5",
            LXstate: "5",
            HTstate: "15",

            //筛选条件展示区域
            SQvalue: "上会通过",
            GSvalue: "",
            LXvalue: "",
            HTvalue: "",

            //按钮切换
            switchover: "1",
            active: "1",
            editActive: "",
            selectActive: "",
            selectActiveAll: "",
            selectActiveExport: "",
            operation: false,
            notPassed: true,

            // 根据时间搜索
            startDate: "",
            endDate: "",

            count: 0,
            time1: "",
            pageNum: 1,
            pageSize: 10,
            totalCount: 0,
            companyName: "",
            companList: [],

            //选择操作
            policySection: [],
            SendObj: {},
            policySectionString: "",
            selectColorBtn: "",

            //生成、导出、发送的全选状态区分
            selectAll: "N",

            //模态框（合同审批及查看）
            approvalModal: false,
            viewerContract: false,
            reasonModal: false,
            CompaniesSubmitPath: "",
            passBackModal: false,
            uploadUrl: this._URL_v2 + "/filecommon/uploadFile",
            reasonText: "",
            applyId: "",
            files: "",
            //计时器
            timer: null,
            step: -250,

            //记录二次点击状态：
            clickGS01: false,
            clickGS02: false,

            clickLX01: false,
            clickLX02: false,

            clickHT01: false,
            clickHT02: false,
            clickHT03: false,
            clickHT04: false,
            clickHT05: false,
            clickHT06: false,
            clickSelectAll: false
        };
    },
    mounted() {},
    computed: {
        filesObj() {
            return this.files != "" && this.files.id != "";
        }
    },
    methods: {
        filter(index) {
            this.active = index;
            this.operation = true;
            this.pageNum = 1;
            this.pageSize = 10;
            if (index == 1) {
                this.filterButton01 = true;
                this.filterButton02 = false;
                this.filterButton03 = false;
                this.filterButton04 = false;
                this.filterButton05 = false;
                this.filterButton06 = false;
            } else if (index == 2) {
                this.filterButton01 = false;
                this.filterButton02 = true;
                this.filterButton03 = false;
                this.filterButton04 = false;
                this.filterButton05 = false;
                this.filterButton06 = false;
            } else if (index == 3) {
                this.filterButton01 = false;
                this.filterButton02 = false;
                this.filterButton03 = true;
                this.filterButton04 = false;
                this.filterButton05 = false;
                this.filterButton06 = false;
            } else if (index == 4) {
                this.filterButton01 = false;
                this.filterButton02 = false;
                this.filterButton03 = false;
                this.filterButton04 = true;
                this.filterButton05 = false;
                this.filterButton06 = false;
            } else if (index == 5) {
                this.switchover = "2";
                this.editActive = "";
                this.filterButton01 = false;
                this.filterButton02 = false;
                this.filterButton03 = false;
                this.filterButton04 = false;
                this.filterButton05 = true;
                this.filterButton06 = false;
            } else if (index == 6) {
                this.switchover = "3";
                this.selectActive = "";
                this.filterButton01 = false;
                this.filterButton02 = false;
                this.filterButton03 = false;
                this.filterButton04 = false;
                this.filterButton05 = false;
                this.filterButton06 = true;
                this.pageSize = 1000;
                this.seekInfo(
                    this.manageInfoObj,
                    this.SQstate,
                    this.GSstate,
                    this.LXstate,
                    this.HTstate
                );
            }
        },

        // 一进页面获取列表信息
        getStatusInfo() {
            this.ajaxData(
                {
                    url: "/workflow/getApplyList",
                    type: "get",
                    data: {
                        companyName: "",
                        applyStatus: "38",
                        publicStatus: "",
                        approvalStatus: "",
                        signStatus: "",
                        page: "",
                        pageSize: "",
                        startTime: "", //起始时间
                        endTime: "", //结束时间
                        page: 1,
                        pageSize: this.pageSize
                    }
                },
                res => {
                    this.manageInfoObj = res[0];
                    this.manageInfoList = res[0].allFinishApplyList;
                    this.totalCount = res[0].totalCount;
                }
            );
        },

        seekInfo(statusObj, SQstate, GSstate, LXstate, HTstate) {
            this.ajaxData(
                {
                    url: "/workflow/getApplyList",
                    type: "get",
                    data: {
                        companyName: this.companyName,
                        applyStatus:
                            statusObj.applyStatus == ""
                                ? ""
                                : SQstate != ""
                                    ? SQstate
                                    : statusObj.applyStatus,

                        publicStatus:
                            this.GSstate == "5"
                                ? ""
                                : this.GSstate == "6"
                                    ? ""
                                    : this.GSstate != "5" && this.GSstate != "6"
                                        ? this.GSstate
                                        : statusObj.publicStatus,

                        approvalStatus:
                            this.LXstate == "5"
                                ? ""
                                : this.LXstate == "6"
                                    ? ""
                                    : this.LXstate != "5" && this.LXstate != "6"
                                        ? this.LXstate
                                        : statusObj.approvalStatus,
                        signStatus:
                            this.HTstate == "15"
                                ? ""
                                : this.HTstate == "16"
                                    ? ""
                                    : this.HTstate != "15" &&
                                      this.HTstate != "16"
                                        ? this.HTstate
                                        : statusObj.signStatus,
                        page: "",
                        pageSize: "",
                        startTime: this.startDate,
                        endTime: this.endDate,
                        page: this.pageNum,
                        pageSize: this.pageSize
                    }
                },
                res => {
                    this.manageInfoObj = res[0];
                    this.manageInfoList = res[0].allFinishApplyList;
                    this.totalCount = res[0].totalCount;
                }
            );
        },

        policyApplyDetail(id) {
            this.$router.push({
                path: "/component",
                name: "Component",
                query: {
                    id: id,
                    name: "onlineApply",
                    pageName: "查看企业线上申请"
                }
            });
        },

        selectStatus(state) {
            this.pageNum = 1;

            if (state == "SQ1" || state == "SQ2" || state == "SQ3") {
                this.seek_SQ = state;

                if (state == "SQ1") {
                    this.notPassed = true;
                    this.SQstate = "38";
                    this.SQvalue = "上会通过";
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "SQ2") {
                    this.notPassed = false;
                    this.SQstate = "39";
                    this.SQvalue = "上会不通过";
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "SQ3") {
                    this.notPassed = false;
                    this.SQstate = "49";
                    this.SQvalue = "强制中断";
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                }
            }

            if (state == "GS1" || state == "GS2") {
                this.seek_GS = state;
                if (state == "GS1") {
                    this.GSstate = "1";
                    this.GSvalue = "已生成公示文件";
                    this.clickGS01 = !this.clickGS01;
                    if (this.clickGS01 == true) {
                        this.clickGS02 = false;
                    }
                    if (this.clickGS01 == false) {
                        this.seek_GS = "";
                        this.GSstate = "6";
                        this.GSvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                } else if (state == "GS2") {
                    this.GSstate = "0";
                    this.GSvalue = "未生成公示文件";
                    this.clickGS02 = !this.clickGS02;
                    if (this.clickGS02 == true) {
                        this.clickGS01 = false;
                    }
                    if (this.clickGS02 == false) {
                        this.seek_GS = "";
                        this.GSstate = "6";
                        this.GSvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                }
                this.seekInfo(
                    this.manageInfoObj,
                    this.SQstate,
                    this.GSstate,
                    this.LXstate,
                    this.HTstate
                );
            }

            if (state == "LX1" || state == "LX2") {
                this.seek_LX = state;
                if (state == "LX1") {
                    this.LXstate = "1";
                    this.LXvalue = "已生成立项文件";
                    this.clickLX01 = !this.clickLX01;
                    if (this.clickLX01 == true) {
                        this.clickLX02 = false;
                    }
                    if (this.clickLX01 == false) {
                        this.seek_LX = "";
                        this.LXstate = "6";
                        this.LXvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "LX2") {
                    this.LXstate = "0";
                    this.LXvalue = "未生成立项文件";
                    this.clickLX02 = !this.clickLX02;
                    if (this.clickLX02 == true) {
                        this.clickLX01 = false;
                    }
                    if (this.clickLX02 == false) {
                        this.seek_LX = "";
                        this.LXstate = "6";
                        this.LXvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                }
            }

            if (
                state == "HT1" ||
                state == "HT2" ||
                state == "HT3" ||
                state == "HT4" ||
                state == "HT5" ||
                state == "HT6"
            ) {
                this.seek_HT = state;
                if (state == "HT1") {
                    this.seek_HT = state;
                    this.HTstate = "0";
                    this.HTvalue = "未发送合同文档";
                    this.clickHT01 = !this.clickHT01;
                    if (this.clickHT01 == true) {
                        this.clickHT02 = false;
                        this.clickHT03 = false;
                        this.clickHT04 = false;
                        this.clickHT05 = false;
                        this.clickHT06 = false;
                    }
                    if (this.clickHT01 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "HT2") {
                    this.seek_HT = state;
                    this.HTstate = "1";
                    this.HTvalue = "已发送合同文档";
                    this.clickHT02 = !this.clickHT02;
                    if (this.clickHT02 == true) {
                        this.clickHT01 = false;
                        this.clickHT03 = false;
                        this.clickHT04 = false;
                        this.clickHT05 = false;
                        this.clickHT06 = false;
                    }
                    if (this.clickHT02 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "HT3") {
                    this.seek_HT = state;
                    this.HTstate = "2";
                    this.HTvalue = "合同未审批";
                    this.clickHT03 = !this.clickHT03;
                    if (this.clickHT03 == true) {
                        this.clickHT01 = false;
                        this.clickHT02 = false;
                        this.clickHT04 = false;
                        this.clickHT05 = false;
                        this.clickHT06 = false;
                    }
                    if (this.clickHT03 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "HT4") {
                    this.seek_HT = state;
                    this.HTstate = "3";
                    this.HTvalue = "合同审批通过";
                    this.clickHT04 = !this.clickHT04;
                    if (this.clickHT04 == true) {
                        this.clickHT01 = false;
                        this.clickHT02 = false;
                        this.clickHT03 = false;
                        this.clickHT05 = false;
                        this.clickHT06 = false;
                    }
                    if (this.clickHT04 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "HT5") {
                    this.seek_HT = state;
                    this.HTstate = "4";
                    this.HTvalue = "合同审批不通过";
                    this.clickHT05 = !this.clickHT05;
                    if (this.clickHT05 == true) {
                        this.clickHT01 = false;
                        this.clickHT02 = false;
                        this.clickHT03 = false;
                        this.clickHT04 = false;
                        this.clickHT06 = false;
                    }
                    if (this.clickHT05 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                } else if (state == "HT6") {
                    this.seek_HT = state;
                    this.HTstate = "5";
                    this.HTvalue = "合同已回传";
                    this.clickHT06 = !this.clickHT06;
                    if (this.clickHT06 == true) {
                        this.clickHT01 = false;
                        this.clickHT02 = false;
                        this.clickHT03 = false;
                        this.clickHT04 = false;
                        this.clickHT05 = false;
                    }
                    if (this.clickHT06 == false) {
                        this.seek_HT = "";
                        this.HTstate = "16";
                        this.HTvalue = "";
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                }
            }
        },

        claicEditBtn(index) {
            this.editActive = index;
            this.switchover = "1";
        },

        PublicityStatus(active, index) {
            if (active == 0) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updatePublicAndApprovalStauts",
                        data: {
                            publicStatus: "0",
                            applyId: this.manageInfoList[index].applyId
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            } else if (active == 1) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updatePublicAndApprovalStauts",
                        data: {
                            publicStatus: "1",
                            applyId: this.manageInfoList[index].applyId
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            }
        },

        projectStatus(active, index) {
            if (active == 0) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updatePublicAndApprovalStauts",
                        data: {
                            approvalStatus: "0",
                            applyId: this.manageInfoList[index].applyId
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            } else if (active == 1) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updatePublicAndApprovalStauts",
                        data: {
                            approvalStatus: "1",
                            applyId: this.manageInfoList[index].applyId
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            }
        },

        auditStatus(active, Obj) {
            if (active == 0) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updateSign",
                        data: {
                            signStatus: "7", //签约状态（0是未发送合同模板，1已发送合同模板，2合同未审批，3合同审批通过,4合同审批不通过，5合同已回传）
                            rejectReson: "", //拒绝理由
                            applyId: Obj.applyId, //申请id
                            fileInfoId: "-1", //回传文件的id
                            paperStatus: "0" //是否接收纸质状态（6是审核通过，7是已接收纸质）
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            } else if (active == 1) {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updateSign",
                        data: {
                            signStatus: "6", //签约状态（0是未发送合同模板，1已发送合同模板，2合同未审批，3合同审批通过,4合同审批不通过，5合同已回传）
                            rejectReson: "", //拒绝理由
                            applyId: Obj.applyId, //申请id
                            fileInfoId: "-1", //回传文件的id
                            paperStatus: "1" //是否接收纸质状态（6是审核通过，7是已接收纸质）
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            }
        },

        approveTheContract(Obj) {
            this.applyId = Obj.applyId;
            this.CompaniesSubmitPath = Obj.filePath;
            this.approvalModal = true;
        },

        reject() {
            this.approvalModal = false;
            this.reasonModal = true;
        },
        abolish() {
            this.reasonText = "";
            this.reasonModal = false;
        },

        asyncOK() {
            if (this.reasonText == "") {
                this.$Message.warning("请填写驳回理由");
                return;
            } else {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updateSign",
                        data: {
                            signStatus: "4", //签约状态（0是未发送合同模板，1已发送合同模板，2合同未审批，3合同审批通过,4合同审批不通过，5合同已回传）
                            rejectReson: this.reasonText, //拒绝理由
                            applyId: this.applyId, //申请id
                            fileInfoId: "-1", //回传文件的id
                            paperStatus: "0" //是否接收纸质状态（0是未接收，1是已接收）
                        }
                    },
                    res => {
                        this.$Message.success("已驳回");
                        this.reasonText = "";
                        this.reasonModal = false;
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                    }
                );
            }
        },

        pass() {
            this.ajaxData(
                {
                    type: "post",
                    url: "/workflow/updateSign",
                    data: {
                        signStatus: "3", //签约状态（0是未发送合同模板，1已发送合同模板，2合同未审批，3合同审批通过,4合同审批不通过，5合同已回传）
                        rejectReson: "", //拒绝理由
                        applyId: this.applyId, //申请id
                        fileInfoId: "-1", //回传文件的id
                        paperStatus: "0" //是否接收纸质状态（0是未接收，1是已接收）
                    }
                },
                res => {
                    this.approvalModal = false;
                    this.$Message.success("审核通过");
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                }
            );
        },

        uploadFileBtn(items) {
            this.applyId = items.applyId;
            this.passBackModal = true;
        },

        viewer(Obj) {
            this.viewerContract = true;
            this.CompaniesSubmitPath = Obj.filePath;
            console.log(Obj);
        },

        selectBtn(active) {
            if (active == 1) {
                if (this.policySectionString == "") {
                    this.$Message.warning("请先选择政策");
                    return;
                } else {
                    this.clickSelectAll = false;
                    this.selectActive = active;
                    this.ajaxData(
                        {
                            type: "post",
                            url: "/workflow/exportPublicList",
                            data: {
                                name: this.companyName,
                                applyStatus: this.SQstate, // 申请状态(38 批准拨款（上会通过）； 39 拒绝拨款（上会不通过）；49 强制中断)
                                publicStatus:
                                    this.GSstate == "5" ? "" : this.GSstate, // 公示状态（0 未公示；1 已公示）
                                approvalStatus:
                                    this.LXstate == "5" ? "" : this.LXstate, //：立项状态（0 未立项；1 已立项）
                                signStatus:
                                    this.HTstate == "15" ? "" : this.HTstate, //签约状态
                                startTime: this.startDate, //上会开始时间
                                endTime: this.endDate, //上会结束时间
                                applyIds: this.policySectionString, //多个申请id（用逗号隔开）
                                selectAll:
                                    this.selectAll == "N" ? this.selectAll : "Y"
                            }
                        },
                        res => {
                            console.log("生成公示的地址");
                            window.open(res.fileUrl);
                            this.seekInfo(
                                this.manageInfoObj,
                                this.SQstate,
                                this.GSstate,
                                this.LXstate,
                                this.HTstate
                            );
                        }
                    );
                }
            } else if (active == 2) {
                if (this.policySectionString == "") {
                    this.$Message.warning("请先选择政策");
                    return;
                } else {
                    this.clickSelectAll = false;
                    this.selectActive = active;
                    this.ajaxData(
                        {
                            type: "post",
                            url: "/workflow/exportApprovalList",
                            data: {
                                name: this.companyName,
                                applyStatus: this.SQstate,
                                publicStatus:
                                    this.GSstate == "5" ? "" : this.GSstate,
                                approvalStatus:
                                    this.LXstate == "5" ? "" : this.LXstate,
                                signStatus:
                                    this.HTstate == "15" ? "" : this.HTstate,
                                startTime: this.startDate,
                                endTime: this.endDate,
                                applyIds: this.policySectionString,
                                selectAll:
                                    this.selectAll == "N" ? this.selectAll : "Y"
                            }
                        },
                        res => {
                            window.open(res.fileUrl);
                            //===
                            this.seekInfo(
                                this.manageInfoObj,
                                this.SQstate,
                                this.GSstate,
                                this.LXstate,
                                this.HTstate
                            );
                            //======
                        }
                    );
                }
            } else if (active == 3) {
                if (this.policySectionString == "") {
                    this.$Message.warning("请先选择政策");
                    return;
                } else {
                    this.clickSelectAll = false;
                    this.selectActive = active;
                    this.ajaxData(
                        {
                            type: "get",
                            url: "/workflow/getSignTemplates",
                            data: {}
                        },
                        res => {
                            this.contractTemplateList = res;
                        }
                    );
                    this.timer = setInterval(() => {
                        this.step += 25;
                        if (this.step > 0) {
                            clearInterval(this.timer);
                            this.$refs.compactShell.style.right = 0 + "px";
                        } else {
                            this.$refs.compactShell.style.right =
                                this.step + "px";
                        }
                    }, 50);
                }
            } else if (active == 4) {
                this.clickSelectAll = !this.clickSelectAll;
                this.selectActiveExport = "";

                if (this.manageInfoList.length < 1) {
                    this.$Message.warning("没有政策可以选择");
                    return;
                } else {
                    this.policySection = [];
                    this.policySectionString = "";
                    this.selectAll = "Y";
                    this.selectActiveAll = 4;
                    for (var i = 0; i < this.manageInfoList.length; i++) {
                        this.policySection.push(this.manageInfoList[i].applyId);
                    }
                    let transition = this.policySection.toString();
                    this.policySectionString = transition;

                    if (this.clickSelectAll == false) {
                        this.selectActiveAll = 0;
                        this.selectAll = "N";
                        this.policySection = [];
                        this.policySectionString = "";
                    }
                }
            } else if (active == 5) {
                if (this.policySectionString == "") {
                    this.$Message.warning("请先选择要导出的政策");
                    return;
                } else {
                    this.clickSelectAll = false;
                    this.selectActiveExport = 5;
                    this.ajaxData(
                        {
                            type: "get",
                            url: "/workflow/exportApplyList",
                            data: {
                                name: this.companyName,
                                applyStatus: this.SQstate,
                                publicStatus:
                                    this.GSstate == "5" ? "" : this.GSstate,
                                approvalStatus:
                                    this.LXstate == "5" ? "" : this.LXstate,
                                signStatus:
                                    this.HTstate == "15" ? "" : this.HTstate,
                                startTime: this.startDate,
                                endTime: this.endDate,
                                applyIds: this.policySectionString,
                                selectAll:
                                    this.selectAll == "N" ? this.selectAll : "Y"
                            }
                        },
                        res => {
                            console.log("页面导出");
                            window.open(res.fileUrl);
                        }
                    );
                }
            } else if (active == 6) {
                //返回
                this.clickSelectAll = false;
                this.switchover = "1";
                this.selectActiveAll = 0;
                this.selectActiveExport = 0;
                this.policySection = [];
                this.policySectionString = "";
                this.pageSize = 10;
                this.seekInfo(
                    this.manageInfoObj,
                    this.SQstate,
                    this.GSstate,
                    this.LXstate,
                    this.HTstate
                );
            }
        },

        //选中的政策
        selectThePolicy() {
            this.selectActive = "";
            let transition = this.policySection.toString();
            this.policySectionString = transition;
            console.log("下面是选中的数组");
            console.log(this.policySection);
            if (this.policySection.length != this.manageInfoList.length) {
                this.selectActiveAll = 0;
                this.selectAll = "N";
            }
        },

        optionalModule(index, compactObj) {
            this.selectColorBtn = compactObj.id;
            this.SendObj = compactObj;
        },

        //确定发送合同模板
        sendTemplate() {
            if (JSON.stringify(this.SendObj) == "{}") {
                this.$Message.warning("请先选择模板");
                return;
            } else {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/sendSign",
                        data: {
                            signTemplateId: this.SendObj.id,
                            signStatus: "1", //传状态1
                            applyIds: this.policySectionString //申请id
                        }
                    },
                    res => {
                        if (res[0].reson != "" && res[0].success != "") {
                            this.$Message.warning({
                                content: `已发送成功${
                                    res[0].success
                                }份合同模板; ${
                                    res[0].failure
                                }份合同未发送成功！`,
                                duration: 5
                            });
                            this.showAnimation();
                            return;
                        } else if (res[0].reson != "" && res[0].success == "") {
                            this.$Message.warning(
                                `${res[0].failure}份合同未发送成功！`
                            );
                        } else {
                            this.$Message.success(
                                `已发送成功${res[0].success}份合同模板！`
                            );
                            this.seekInfo(
                                this.manageInfoObj,
                                this.SQstate,
                                this.GSstate,
                                this.LXstate,
                                this.HTstate
                            );
                            this.showAnimation();
                            this.getStatusInfo();
                            this.switchover = "1";
                            this.policySection = [];
                            this.SendObj = {};
                        }
                    }
                );
            }
        },

        cancelBtn() {
            this.showAnimation();
        },

        showAnimation() {
            this.timer = setInterval(() => {
                this.step -= 20;
                if (this.step > -250) {
                    this.$refs.compactShell.style.right = this.step + "px";
                } else {
                    clearInterval(this.timer);
                    this.$refs.compactShell.style.right = -300 + "px";
                    this.selectColorBtn = "";
                    this.SendObj = {};
                }
            }, 50);
        },

        //获取用户选择的日期
        getDateValue(value) {
            if (value[0] != "") {
                this.startDate = new Date(value[0]).getTime();
                this.endDate = new Date(value[1]).getTime();
                this.seekInfo(
                    this.manageInfoObj,
                    this.SQstate,
                    this.GSstate,
                    this.LXstate,
                    this.HTstate
                );
            } else {
                this.startDate = "";
                this.endDate = "";
                this.seekInfo(
                    this.manageInfoObj,
                    this.SQstate,
                    this.GSstate,
                    this.LXstate,
                    this.HTstate
                );
            }
        },

        // 搜索公司名
        searchCompany() {
            if (this.companyName != "") {
                this.ajaxData(
                    {
                        type: "get",
                        url: "/workflow/getCompanyNameAndPolityTitle",
                        data: {
                            name: this.companyName
                        }
                    },
                    res => {
                        this.companList = res;
                    }
                );
            } else {
                this.companList = "";

                setTimeout(() => {
                    this.seekInfo(
                        this.manageInfoObj,
                        this.SQstate,
                        this.GSstate,
                        this.LXstate,
                        this.HTstate
                    );
                }, 2000);
            }
        },

        currentCompany(index) {
            this.companyName = this.companList[index].companyName;
            this.companList = "";
        },

        //确认根据公司名搜索(搜索按钮)
        searchCompanyBtn() {
            if(this.companyName!=''){
                this.pageNum = 1;
            }
            this.seekInfo(
                this.manageInfoObj,
                this.SQstate,
                this.GSstate,
                this.LXstate,
                this.HTstate
            );
            setTimeout(() => {
                if (this.manageInfoList.length == 0) {
                    this.$Message.error("未检索到对应的搜索结果！");
                }
            }, 1000);
            this.companList = "";
        },

        handlePageSize(value) {
            this.pageNum = value;
            this.policySection = [];
            this.policySectionString = "";
            this.selectActiveAll = 0;
            this.seekInfo(
                this.manageInfoObj,
                this.SQstate,
                this.GSstate,
                this.LXstate,
                this.HTstate
            );
        },

        //分页点击
        handlePage(value) {
            this.pageNum = value;
            this.policySection = [];
            this.policySectionString = "";
            this.selectActiveAll = 0;
            this.seekInfo(
                this.manageInfoObj,
                this.SQstate,
                this.GSstate,
                this.LXstate,
                this.HTstate
            );
        },

        handleBefore(file) {
            if (file.type !== "application/pdf") {
                this.$Message.error("只能上传 PDF 文件");
                return false;
            }
        },

        handleSuccess(file) {
            this.files = file.result;
        },

        cancleUpload(Obj) {
            if (this.files != "") {
                this.packDeleteFile();
            }
            this.$Message.warning("取消回传");
            this.files = "";
            this.passBackModal = false;
        },

        confirmUpload() {
            if (this.files != "") {
                this.ajaxData(
                    {
                        type: "post",
                        url: "/workflow/updateSign",
                        data: {
                            signStatus: "5",
                            rejectReson: "",
                            applyId: this.applyId,
                            fileInfoId: this.files.id,
                            paperStatus: "0"
                        }
                    },
                    res => {
                        this.seekInfo(
                            this.manageInfoObj,
                            this.SQstate,
                            this.GSstate,
                            this.LXstate,
                            this.HTstate
                        );
                        this.$Message.success("文件已回传");
                        this.passBackModal = false;
                        this.files = "";
                    }
                );
            } else {
                this.$Message.warning("取消回传");
                this.passBackModal = false;
            }
        },

        deleteFile() {
            this.packDeleteFile();
        },

        packDeleteFile() {
            this.ajaxData(
                {
                    type: "post",
                    url: "/filecommon/deleteFile",
                    data: {
                        formSupplementId: this.files.id,
                        filePath: this.files.filePath
                    }
                },
                res => {
                    this.files = "";
                }
            );
        }
    },
    created() {
        this.getStatusInfo();
    }
};
</script>
